%igetsig.m
%gets seed value for sig2, sigma-sqared

sig2 = 0;
for s = 1:Ns,
  e2 = ( y(s)-a(t(s)-BeginYear+1) - b(t(s)-BeginYear+1)*x(i(s)) )^2;
  sig2=sig2+e2;
  %[s,i(s),y(s),x(i(s)),e2]
end;
sig2 = sig2/Ns;
sig = sqrt(sig2);
%sig2
